package ch2;

import java.util.Scanner;

public class Ex2 {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);  //控制台输入语法
        System.out.println("输入半径：");
        double c = console.nextDouble();//半径
        System.out.println("输入长度：");
        double s = console.nextDouble();//长度
        System.out.println("面积：" + (c * c) * 3.1415926);
        System.out.println("体积：" + ((c * c) * 3.1415926) * s);
    }
}
